//@author A0084731E
import java.util.Calendar;

public class BudgetPlannerItem extends Transaction{

	// ATTRIBUTES
	private int _priority;

	// CONSTRUCTOR
	public BudgetPlannerItem(String name, double value, String type, String date, String category, String paymentMethod, String remarks, String status, int priority) throws Exception {
		super(name, value, type, date, category, paymentMethod, remarks, status);
		this._priority = priority;
	}
	
	// METHODS
	// Getter
	public int getPriority() {
		return _priority;
	}
	// Setters
	public void setPriority(int priority) {
		this._priority = priority;
	}
	
	// Clone	
	public BudgetPlannerItem clone() {
		try {
			return new BudgetPlannerItem(this.getName(), this.getValue(), this.getType().toString() +"", this.getDate().get(Calendar.DAY_OF_MONTH) + "." + (this.getDate().get(Calendar.MONTH) + 1)  + "." + this.getDate().get(Calendar.YEAR), this.getCategory(), this.getPaymentMethod(), this.getRemarks(), this.getStatus().toString(), this.getPriority());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}
	// String representation
	@Override
	public String toString(){
		return "# " + super.toString() + " " + this.getPriority();
	}
}
